﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace DiskGarden
{
	[Flags]
	public enum NodeType
	{
		File = 1,
		Directory = 2,
		Volume = 4,
		Category = 8,
		Root = 16
	}

	public enum VolumeType
	{
		CD, DVD, HDD, USB, Other
	}

	public delegate void NodeEventHandler(Node node);
	public delegate void BasicEventHandler();



	public static class Icons
	{
		static ImageList imgList;
		public static ImageList ImgList { get { return imgList; } }
		public const string Cd = "cd";
		public const string Category = "category";
		public const string Folder = "folder";
		public const string Options = "options";
		public const string Find = "find";
		public const string AddDrive = "addDrive";
		public const string File = "file";
		public const string Open = "open";
		public const string Save = "save";
		public const string SaveAs = "saveAs";

		static Icons()
		{
			imgList = new ImageList();
			imgList.ColorDepth = ColorDepth.Depth32Bit;
			imgList.TransparentColor = Color.Transparent;
			imgList.Images.Add(Icons.Cd, Properties.Resources.cd);
			imgList.Images.Add(Icons.Category, Properties.Resources.database);
			imgList.Images.Add(Icons.Folder, Properties.Resources.folder);
			imgList.Images.Add(Icons.Options, Properties.Resources.wrench);
			imgList.Images.Add(Icons.Find, Properties.Resources.zoom);
			imgList.Images.Add(Icons.AddDrive, Properties.Resources.cd_add);
			imgList.Images.Add(Icons.File, Properties.Resources.page);
			imgList.Images.Add(Icons.Open, Properties.Resources.folder_database);
			imgList.Images.Add(Icons.Save, Properties.Resources.disk);
			imgList.Images.Add(Icons.SaveAs, Properties.Resources.disk_multiple);
		}

		public static int GetImageIndex(string imageKey)
		{
			return imgList.Images.IndexOfKey(imageKey);
		}
	}


}
